<?php


namespace app\model;


use think\Model;
use think\model\concern\SoftDelete;

class Article extends Model
{
    use SoftDelete;
    protected $deleteTime = 'delete_time';

    public function getCreateTimeAttr($val)
    {
        return date('Y-m-d H:i:s',$val);
    }
    public function getDateAttr($val)
    {
        return date('Y-m-d H:i:s',$val);
    }
    public function getDeleteTimeAttr($val)
    {
        return date('Y-m-d H:i:s',$val);
    }

    public function setDateAttr($value) {
        return strtotime($value);
    }
    public function setContentAttr($value) {
        return htmlspecialchars_decode($value);
    }
}